<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/common/common_taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>梦网工具本</title>
<jsp:include page="/WEB-INF/pages/include/head.jsp"></jsp:include>
<link href="/css/code.css" rel="stylesheet" type="text/css" />
<link href="/css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/jquery-time/css/about.css" />
<script type="text/javascript" src="/js/footlist.js"></script>
<script type="text/javascript" src="/jquery-top/js/jquery.toTop.min.js"></script>
</head>
<body class="off-nav">
	<jsp:include page="/WEB-INF/pages/fc/include/nav.jsp"></jsp:include>
	<div id="main-div">
		<div class="pull-right" style="margin-right: 40px;"><a href="/foot/toAdd" class="btn btn-default"><i
			class="cus-page_edit"></i>添加足迹</a></div>
		<c:if test="${empty footList }">
				暂无足迹...
			</c:if>
		<c:if test="${not empty footList }">
			<div class="box">
				<ul class="event_year">
					<c:forEach items="${yearList }" var="f">
						<li><label for="${f.time }">${f.time }</label></li>
					</c:forEach>
				</ul>
				<ul class="event_list">
					<% int a = 0; %>
					<c:forEach items="${footList }" var="foot">
						<div>
							<c:set var="curyear">
								<fmt:formatDate pattern="yyyy" value="${foot.time }"/>
							</c:set>
							<% if(a==0){ %>
							<h3 id='<fmt:formatDate pattern="yyyy" value="${foot.time }"/>'>
								<fmt:formatDate pattern="yyyy" value="${foot.time }" />
							</h3>
							<% } %>
							<% if(a>0){ %>
								<c:if test="${preyear ne curyear }">
									<h3 id='<fmt:formatDate pattern="yyyy" value="${foot.time }"/>'>
										<fmt:formatDate pattern="yyyy" value="${foot.time }" />
									</h3>
								</c:if>	
							<% } %>
							<li><span style="color: red;"><fmt:formatDate pattern="MM-dd"
										value="${foot.time }" /></span>
								<p>
									<span> 
										<x>从　</x>${foot.startPoint } <x>到　</x> ${foot.endPoint }<x style="margin-left:5px;">天气：</x>${foot.weather }
										<z class="pull-right" style="color:blue;">
										<a href="/foot/toUpdate/${foot.id }" title="修改"><i class="glyphicon glyphicon-pencil"></i></a>　
										<a href="javascript:void(0);" id="layer-delete-btn" path="/foot/delete/${foot.id }"title="删除"><i class="glyphicon glyphicon-remove"></i></a></z>
										<br/>
										<y>心情：</y>${foot.heart }<br/>
										 ${foot.mind }
									</span>
								</p></li>
						</div>
						<% a++; %>
						<c:set var="preyear">
								<fmt:formatDate pattern="yyyy" value="${foot.time }"/>
							</c:set>
					</c:forEach>
				</ul>
			</div>
		</c:if>
	</div>
	<a class="to-top"><span class="glyphicon glyphicon-arrow-up"></span></a>
	<jsp:include page="/WEB-INF/pages/include/copyright.jsp"></jsp:include>
</body>
</html>
